package com.micro.ai.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;

/**
 * 角色创建请求
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "角色创建请求")
public class RoleCreateRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "所属租户ID（系统角色不填）")
    private String tenantId;

    @NotBlank(message = "角色编码不能为空")
    @Size(min = 2, max = 50, message = "角色编码长度为2-50个字符")
    @Schema(description = "角色编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "ROLE_ADMIN")
    private String code;

    @NotBlank(message = "角色名称不能为空")
    @Size(min = 2, max = 50, message = "角色名称长度为2-50个字符")
    @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员")
    private String name;

    @Size(max = 200, message = "角色描述不能超过200个字符")
    @Schema(description = "角色描述", example = "系统管理员角色")
    private String description;

    @Schema(description = "角色类型：system-系统角色, custom-自定义角色", example = "custom")
    private String type;

    @Schema(description = "父角色ID")
    private String parentId;

    @Schema(description = "排序", example = "1")
    private Integer sortOrder;

    @Schema(description = "状态：active-活跃, inactive-未激活", example = "active")
    private String status;
}

